<template>
  <div class="home-banner">
    <xtx-carousel :sliders="BannerList"/>
  </div>
</template>

<script>
import { homeBanner } from '@/api/home.js'
import { onMounted, reactive, ref } from 'vue-demi';
export default {
  name: "HomeBanner",
  setup() {
    // 获取轮播图数据
    const BannerList = ref([])
    homeBanner().then(result => {
      BannerList.value = result.result
    })


    return {
      BannerList
    }
  }
};
</script>

<style scoped lang="less">
.home-banner {
  width: 1240px;
  height: 500px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 98;
}
//  穿透样式，左箭头 - 指示器
.xtx-carousel {
  :deep(.carousel-btn.prev) {
    left: 270px !important;
  }
  :deep(.carousel-indicator) {
    padding-left: 250px;
  }
}
</style>
